package cn.tedu.boke.portal.mapper;

import cn.tedu.boke.portal.model.View;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 浏览量 Mapper 接口
 * </p>
 *
 * @author tedu.cn
 * @since 2021-11-04
 */
@Repository
public interface ViewMapper extends BaseMapper<View>
{
    @Select("SELECT COUNT(post_id) FROM view WHERE post_id=#{id}")
    int viewnum(Integer id);
}
